package iu.test;

import org.testng.annotations.BeforeMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import pages.HomePage;
import utils.LogTest;

/**
 * Created by Olga on 05.06.2014.
 */
public class SearchAndCompareNew extends CommonTestSteps {

    @DataProvider
    public Object[][] products() {
        return new Object[][]{
                new Object[]{"ECCO 242683(01163) 41", "ARA 22-52518-01 36"},
                new Object[]{"HTC 601n One mini Glacial Silver (4718487633890) UACRF", "Lenovo S860 Titanium UACRF"},
                new Object[]{"CASIO LDF-30-4AEF", "Certina C004-210"}

        };
    }


    @Test(dataProvider = "products")
    public void productComparison(String product1, String product2) {

        LogTest.info("-----------------Search and Compare Started");
        searchProduct(product1);
        addToComparison();
        searchProduct(product2);
        addToComparison();
        comparisonWorks(product1, product2);

    }

}
